#include <bits/stdc++.h>
using namespace std;
int main(){
    string s;
    cin>>s;
    if (s=="0"){
        cout<<0;
        return 0;
    }
    while (s[s.length()-1]=='0'){
        s.pop_back();
    }
    if (s[0]=='-')
    {
        cout<<'-';
    }
    for (int i = s.length()-1; i >=0; i--)
    {
        if (s[i]=='-') continue;
        cout<<s[i];
    }
    return 0;
}